﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FACUI.BasicClass
{

    public enum DataItemType
    {
        Int,
        Float,
        String,
        Enum
    }

    public class DataItemCfg
    {
        public string DataName = "";
        public string DataType = "";
        public string DefValue = "";
        private Dictionary<string, int> enumDict = new Dictionary<string, int>();
        public bool IsMultSelEnum = false;

        public DataItemCfg Clone()
        {
            return new DataItemCfg { DataName = this.DataName, DataType = this.DataType, DefValue = this.DefValue, enumDict = this.EnumDict, IsMultSelEnum = this.IsMultSelEnum };
        }

        public void SetEnumDict(string enumStr)
        {
            Util.SetEnumDict(enumStr, this.EnumDict);
        }

        public override string ToString()
        {
            return this.DataName;
        }

        public Dictionary<string, int> EnumDict
        {
            get
            {
                return this.enumDict;
            }
        }
    }
}

